CN1658162A - Method for raising processing speed of interface system of attaching position register - Google Patents

Method for raising processing speed of interface system of attaching position register Download PDF

Info

Publication number
CN1658162A
CN1658162A CN 200510024643 CN200510024643A CN1658162A CN 1658162 A CN1658162 A CN 1658162A CN 200510024643 CN200510024643 CN 200510024643 CN 200510024643 A CN200510024643 A CN 200510024643A CN 1658162 A CN1658162 A CN 1658162A
Authority
CN
China
Prior art keywords
position register
attaching position
memory queue
sequence number
memory
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.)
Granted
Application number
CN 200510024643
Other languages
Chinese (zh)
Other versions
CN100343812C (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.)
SHANGHAI GAOZHISOFT CO Ltd
Original Assignee
SHANGHAI GAOZHISOFT 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 SHANGHAI GAOZHISOFT CO Ltd filed Critical SHANGHAI GAOZHISOFT CO Ltd
Priority to CNB2005100246430A priority Critical patent/CN100343812C/en
Publication of CN1658162A publication Critical patent/CN1658162A/en
Application granted granted Critical
Publication of CN100343812C publication Critical patent/CN100343812C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

A method of increasing the executive speed of the imputed position register's interface system. The interface system is linked between the database blank and the imputed position register in the server, and it will add the internally stored group which has been set in the server between the executive schedule-reading process and the communication process. Then it will write the database's schedule data that has been read out to the memory group, and it will convert the schedule data in the memory group to the dictation that can be carried out by the imputed position register's interface system before the data is transferred to the system. Between the communication process executed by the interface system and the schedule-rewriting process, a process is added. This process can write into the memory group which is set in the server the result of executing dictation of the imputed position register, and it then will rewrite the result in the memory group into the database schedule.

Description

Improve the method for processing speed of interface system of attaching position register
Technical field
The present invention relates to a kind of method that improves the interface system processing speed, relate in particular to the method for a kind of raising attaching position register (HLR) interface system processing speed.
Background technology
Along with the fast-developing of telecommunication market with to improving constantly that communication quality requires, telecom operators have higher requirement to equipment supplier and service supplier.The open new interface of attaching position register (HLR) is supported new communication protocol, in order to promote the communication speed of other operation systems and attaching position register.From RS-232 (communication protocol of announcing in 1969 that U.S. Electronic Industries Association (EIA) develops with Bel companies such as (the BELL)) interface that provides the earliest, X.25 (communication protocol that International Telecommunications Union (ITU) formulated in 1992) interface finally, (TCP/IP is the protocol family of a layering to TCP/IP till now, is comprising thousands of agreements.The standardization of present agreement coordinate to be safeguarded by internet society, wherein most importantly Internet protocol (IP), transmission control protocol (TCP), User Datagram Protoco (UDP) (UDP)) interface.
First factor of restriction attaching position register processing speed is the acquisition speed of home location register instruction, and finally is limited by the speed that attaching position register (HLR) instruction is carried out; If attaching position register obtains the instruction less than its execution of needs, then, all can't bring into play the processing power of attaching position register no matter how soon the speed that home location register instruction is carried out has.And the raising of home location register instruction acquisition speed has two approach, the one, and attaching position register provides new communication interface, allows communicating by letter of operation system and attaching position register can use communication protocol faster; The 2nd, improve operation system is submitted instruction to attaching position register speed as far as possible.
Because the operation system that need communicate with attaching position register generally provide the business demand that needs attaching position register to finish in the mode of database table, but not be attaching position register the instruction type that can directly carry out.Therefore need such cover system, it can convert the business demand of operation system to instruction that attaching position register can carry out and the attaching position register execution is submitted in instruction, makes attaching position register can finish business demand.On the other hand, this system also can return to operation system with the instruction execution result of attaching position register, makes the execution result that keeps attaching position register in the operation system, for user inquiring and statistics.This system is the interface system of attaching position register, and its major function is to play instruction transformation effect and communication role between operation system and attaching position register.
The speed that home location register instruction is carried out depends on the model, version of attaching position register etc.And communicate model that selected communication protocol and interface is subject to attaching position register equally, version etc. with attaching position register.Therefore, with the communication protocol of attaching position register and interface has been determined and the instruction executive capability of attaching position register is not fully utilized situation under can reach the purpose that improves the attaching position register processing speed by the processing speed that improves the attaching position register interface system.In other words, optimize attaching position register interface system function, accelerate the speed that the operation system data-switching becomes home location register instruction, promptly can improve the processing speed of attaching position register.
For the interface system that plays the attaching position register of instruction transformation effect and communication role between operation system and attaching position register is to be based upon in the server (computer), generally speaking finishes three functions: meter reading data, communication, write-back execution result.Wherein, the function wanted of meter reading data owner is that the data that operation system provides are read out from database table; Communication function is meant the instruction that the table data-switching that will receive becomes attaching position register to carry out, and attaching position register is submitted in the instruction after will changing; And the instruction execution result of reception attaching position register; The function of write-back execution result is meant that the result of the attaching position register execution command that will receive is written back in the database table.
As seen, formerly the simple reading of data from database table just of the interface system in the technology converts home location register instruction to, attaching position register is submitted in instruction carried out, receive the execution result of attaching position register again, be written back in the database table.In this mode, because the execution of back one step depends on the execution result of previous step.Therefore its limitation is apparent.When the meter reading program did not read record in the database table, signal procedure, attaching position register, write-back list procedure all must be waited for; When signal procedure was not finished instruction transformation, attaching position register, write-back list procedure all must be waited for.If meter reading program this moment is idle, and another record in then can the reading database table, must wait for also then that the wait signal procedure receives next bar record if read another record; When home location register instruction was carried out, write-back list procedure, meter reading program and signal procedure all must be waited for, wait for that this record is finished by attaching position register.
In view of the treatment effeciency of above-mentioned interface system too low, the interface system of some improvement is taked the mode of multi-process, promptly, comprise a plurality of meter reading programs, write-back list procedure and signal procedure in the socket system for a database table and an attaching position register; Because move the program of a plurality of identical functions simultaneously, the efficient of interface system can obviously improve.But this kind mode need increase the linking number with database table.And when linking number rose to higher number, the data base administration expense increased, and took a large amount of Installed System Memories and resource, brought great pressure to operating system.
Summary of the invention
Fundamental purpose of the present invention is to provide a kind of method that improves processing speed of interface system of attaching position register, it can give full play to the processing speed of attaching position register interface system, the speed of instruction is submitted in quickening to attaching position register, reduce the idle waiting time of attaching position register, thereby improve the efficient of attaching position register execution command, improve the communication speed of operation system and attaching position register on the whole.
Technical scheme of the present invention is: carry out in meter reading program, signal procedure and the write-back list procedure for the interface system that is connected between database table and the attaching position register that is based upon in the server (computer), the present invention is added between meter reading program that interface system is carried out and signal procedure in the internal memory of server and sets up memory queue, and with in the formation of reading database table data write memory, the program of attaching position register is submitted in the instruction that becomes attaching position register to carry out the table data-switching in the memory queue again; Between signal procedure that interface system is carried out and write-back list procedure, add and to receive result that attaching position register executes instruction and write in the memory queue in the internal memory that is based upon server, and the result that the attaching position register in the memory queue executes instruction is written back to program in the database table.
The step that the disposal route of interface system of the present invention comprises is:
(1) carry out the meter reading process:
At first according to the logic linking number of the attaching position register that links to each other with interface system, in the internal memory of server, set up the memory queue that exists with the array form of similar number, definition simultaneously comprises the sequence number of the attaching position register of memory queue correspondence, the association attributes of the array quantity in the memory queue etc.; Carry out first program then: according to the order reading database table data from small to large of attaching position register sequence number; Carry out second program again: the record that will read according to the sequence number of attaching position register in the record writes in the pairing memory queue of this sequence number attaching position register, if the pairing memory queue number of this sequence number attaching position register is greater than 1, then deposit the table data of corresponding this attaching position register sequence number according to the order from small to large of the sequence number of memory queue;
(2) communicate process:
At first read the above-mentioned table data that deposit in the memory queue, convert thereof into the receptible instruction of attaching position register, and attaching position register is submitted in the instruction of the attaching position register after will changing; Receive the result of attaching position register execution command simultaneously, and the result that the attaching position register that receives is executed instruction is written in the memory queue;
(3) carry out write-back table process:
Read the above-mentioned result who deposits the attaching position register execution command in the memory queue in, and it is written back in the database table.
The logic of described attaching position register connects interface system and in logic " virtual connections " of attaching position register foundation, the title " virtual circuit " again that is meant attaching position register.It is provisional or nonvolatil " logic " communication channel between the interface system of attaching position register and attaching position register, setting up.Every attaching position register can have a plurality of logics to connect, the interface system of a cover attaching position register also can with many attaching position register physical connections.Therefore, a socket system can set up a plurality of logics with many attaching position registers and is connected.Interface system of the present invention is the basis and the logic linking number of attaching position register are set up equal number in the internal memory of server (computer) a memory queue.
Described memory queue is to exist with the array form.Each memory queue can be created N array.The speed of the speed of the speed of the comprehensive meter reading program of the value of N, the speed of write-back list procedure, signal procedure and attaching position register execution command and fixed.Value as if decide N is too big, and promptly the length of memory queue is long, and then the utilization factor of memory queue is not high, has caused the waste of memory source; On the other hand if the record in memory queue is too many, some record may need to wait for that the long period just can be processed to, and other memory queue might be empty simultaneously; Value as if decide N is too little, and promptly the length of memory queue is too short, and the time that then meter reading program and write-back list procedure need be waited for is too much, can't make full use of the advantage of memory queue.
The content of depositing in the array of memory queue comprises the array sign, running time, the character string that each field contents is merged in the database table etc.Interface system of the present invention utilizes the value of the array sign of depositing in the array to judge the state of array.The different value of array sign has been represented state in the idle condition, armed state, processing of memory queue array respectively, has been handled state.The association attributes of memory queue comprises the attaching position register sequence number of memory queue correspondence, the array quantity of memory queue etc.
Described process is a kind of activity, and it is made up of a series of acts, and each action is the one section program of carrying out on certain data set, and the result of whole activity provides a kind of system or user function.Process can be used for describing the program implementation process, and can be used as the base unit of shared resource.A program is called in internal memory from external memory and is begun to carry out, and operating system will be its establishment process.The meter reading process promptly is meant meter reading program implementation process, and write-back table process promptly is meant the implementation of write-back list procedure, and communication process promptly is meant the implementation of signal procedure.The meter reading program writes the database table data that read in the memory queue that belongs to same attaching position register by affiliated attaching position register sequence number.The number of meter reading process is decided according to the speed and the memory queue length of meter reading program, write-back list procedure.With deposit data in the memory queue and data reading speed about equally, making does not have idle array substantially in the memory queue.Signal procedure and attaching position register all do not have the idle waiting time simultaneously.If meter reading process can't well provide reading database table data and the database table data are put into the appropriate speed of memory queue, also can create a plurality of meter reading processes.Write-back table process reads the memory queue data and the memory queue data is write the appropriate speed of database table if write-back table process can't provide too, also can create a plurality of write-back table processes.Therefore, meter reading process can be only at a memory queue, also can be at a plurality of memory queues; Write-back table process can be only at a memory queue, also can be at a plurality of memory queues; Meter reading process and write-back table process can be at same memory queues, also can be at different memory queues.
Described communication process had both been taken on the data-switching that will need attaching position register to handle in the memory queue and has been become dependent instruction and submit to the function that attaching position register is carried out, and also needed simultaneously to receive among the result and write memory formation of attaching position register execution command.Because same attaching position register can not receive and send data simultaneously, the function that therefore receives and send the attaching position register data concentrates in the signal procedure.Described a plurality of communication process is meant can corresponding a plurality of communication processs to same memory queue, if communication process speed allows, a memory queue can only use a communication process, even a plurality of memory queues can only use a communication process, and the number of communication process operation is determined by the speed of attaching position register execution command.
The described home location register instruction that converts to is meant that the business demand with operation system converts the command format that attaching position register can be discerned to.For example: if the business demand of the table data representation of operation system is " caller identification is set ", then Alcatel home location register instruction form after the conversion is a character string
“ENTGCS:MSIN=XXXXXXXXXX,GCS=CLIP”
Wherein " ENTGCS " string representation is provided with a routine call service (ENTER A GENERAL CALL SERVICE), " MSIN " string representation mobile identification number (MOBILE SUBSCRIBERIDENTIFICATION NUMBER) in " MSIN=XXXXXXXXXX ", " XXXXXXXXXX " expression international mobile subscriber identity (IMSI, maximum length is 15 tens digits) remove (preceding 2 character representation countries behind preceding 5 characters, China's corresponding characters string is " 46 ", preceding the 3rd to the 5th bit representation telecom operators, wherein China Mobile's corresponding characters string is " 000 " or " 002 ", CHINAUNICOM's corresponding characters string is " 001 " or " 003 ") 10 remaining characters, " GCS " string representation normal telephone service (GENERAL CALL SERVICE), " CLIP " string representation caller identification (CALLING LINE IDENTIFICATIONPRESENTATION).
Processing speed by above-mentioned interface system of the present invention as can be seen has raising significantly.Because main technical schemes of the present invention is exactly the terminal of going into database table with memory queue as home location register instruction data converted source and home location register instruction results of execution back.Segmented the treatment step of interface system, meter reading process, write-back table process and communication process branch are belonged to different a plurality of executive process, give full play to the collaborative speed of each program, by improving the execution speed of each operation link, reach the purpose of the processing speed that improves the home location register interface system, and finally reduced idle waiting time of attaching position register, thereby improved the communication speed of operation system and attaching position register.
Description of drawings
Fig. 1 is the synoptic diagram of the attaching position register interface system processing procedure of technology formerly.
Fig. 2 is the synoptic diagram of attaching position register interface system processing procedure of the present invention.
Fig. 3 is the synoptic diagram of attaching position register interface system treatment progress of the present invention.
Fig. 4 is the communication scheme of interface system and database table and attaching position register in the preferred embodiment of the present invention.
Fig. 5 is the communication flow diagram of Fig. 4 embodiment.
Fig. 6 is the memory queue visioning procedure figure of Fig. 4 embodiment.
Fig. 7 is the meter reading data flowchart of the meter reading process of Fig. 4 embodiment.
Fig. 8 is the process flow diagram that the table data of the meter reading process of Fig. 4 embodiment are put into memory queue.
Embodiment
Below in conjunction with accompanying drawing, further introduce method of the present invention.
Shown in Figure 1 is the synoptic diagram of the interface system processing procedure of technology formerly.As can be seen from the figure be connected to the interior interface system of server (computer) 200 interior meter reading program 210, signal procedure 220 and write-back list procedure 230 threes carry out processing procedure for serial the relation that is based upon between database table 100 and the attaching position register 300.The execution result of previous step is the Data Source of back one step.Therefore the idle waiting time of attaching position register is longer in the whole communication process, fails to give full play to the execution command ability of attaching position register.
Fig. 2 is the synoptic diagram of attaching position register interface system processing procedure of the present invention.As can be seen from Figure 2, interface system 200 is when having utilized memory queue, interface system of the present invention is a process independently with meter reading program 210, signal procedure 220 and write-back list procedure 230 separately, in a socket system, a plurality of (at least one) memory queue 201 and a plurality of signal procedure 220 have been used.
Fig. 3 is the synoptic diagram of interface system 200 disposal routes of the present invention.As can be seen from Figure 3, the disposal route of attaching position register interface system comprises three steps, meter reading process 2001, communication process 2002 and write-back table process 2003.Wherein, meter reading process 2001 comprises two programs: first program 20011, read the table data from database table 100; Second program 20012 will be shown in the formation of data write memory.Communication process 2002 also comprises two programs: first program 20021 reads memory queue table data, and attaching position register 300 is submitted in the instruction that is converted into attaching position register; Second program receives the result and the write memory formation of the execution command of attaching position register 300.Write-back table process 2003 comprises that the result that the attaching position register in the memory queue 300 is executed instruction is written back into the program in the database table 100.
Fig. 4 is the communication scheme of interface system and database table and attaching position register in the preferred embodiment of the present invention.
At first, the interface system that is based upon in the server is created M memory queue according to M logic linking number of the s platform attaching position register that connects in the internal memory of server.The array quantity that each memory queue comprises is N.For top efficiency utilize memory source and be fit to the travelling speed of each program, N is decided to be 10-30 is advisable, in following examples, N is decided to be 20.
Secondly, interface system is created a meter reading process, a write-back table process and s communication process.
Once more, meter reading process 2001 reads the record that needs attaching position register to carry out and puts into memory queue 2011, memory queue 2012 or memory queue 2013 from database table 100.
Then, 2002 communication processs 1 read the instruction that untreated database table data-switching becomes attaching position register 300 to carry out from memory queue 2011, attaching position register 300 is submitted in instruction; Attaching position register 300 is carried out the instruction that receives, and execution result is returned to communication process 1, in the array of communication process 1 with the instruction execution result write memory formation 2011 of the attaching position register that receives.
Then, write-back table process 2003 is written back to the result that the attaching position register of depositing in the memory queue executes instruction in the database table 100.
The process flow diagram that Fig. 5 handles for interface system of the present invention.Can further specify Fig. 3, interface system shown in Figure 4 and the concrete communication process of database table and attaching position register.
(1) at first, carry out 2001 beginnings of meter reading process,
The first step one is carried out first program 20011: reading database table data;
Second step 2120: whether the array indexed variable F that judges array in the memory queue is 0, if array indexed variable F is 0, then carries out for the 3rd step;
The 3rd step-execution second program 20012: will show in the array that data write this memory queue, and carry out the 4th step;
The 4th step 2122: the array indexed variable assignment that will write the corresponding memory queue array of table data is 1.The above-mentioned first step 20011, second step the 2120, the 3rd step the 20012 and the 4th step 2122 operations of being done for the meter reading process; Wherein, array indexed variable F=0 is expressed as idle array, but store data storehouse table data, and array indexed variable F=1 is expressed as pending array, its data of depositing can read for communication process, and wait for that communication process carries out instruction transformation and waits for the attaching position register execution it.
[2] communicate process 2002 beginnings:
The 5th step-execution first program 20021: read the table data in the memory queue, and carried out for the 6th step;
The 6th step 2211: with array indexed variable assignment is 2, then carries out for the 7th step;
The 7th step 2212: after the table data in the memory queue are converted to the instruction that attaching position register can carry out, carried out for the 8th step;
The 8th step 2213: attaching position register is submitted in the instruction after will changing;
The 9th step 301: attaching position register is carried out the instruction of receiving;
The tenth goes on foot-communicate process 2002 carries out second program 20022: after receiving the instruction execution result of attaching position register, carried out for the 11 step;
The 11 step 2221: whether the array indexed variable of judging memory queue is 2, if array indexed variable F value is 2, carries out for the 12 step;
The 12 step 2222: the result that the attaching position register that receives is executed instruction writes in this memory array, and carries out for the 13 step;
The 13 step 2223: after the array indexed variable assignment of this memory array correspondence is 3, finish.
The operation that above-mentioned the 5th step-the first program 20021, the 6th step 2211, the 7th step 2212, the 8th step 2213, the 9th step-the second program 20022, the 11 step 2221, the 12 step 2222, the 13 step 2223 are done for communication process.As array indexed variable F=2, be expressed as array in the processing, represent that the interior table data of this array have been submitted to attaching position register and attaching position register does not also return execution result; As array indexed variable F=3, be expressed as and handle array, the data of preserving in this array are the execution result that attaching position register returns.
[3] carry out write-back table process the 14 step 2003: read the data of the execution result that the attaching position register preserved in the array of above-mentioned array indexed variable F=3 returns and write back in the database table.And carry out the 15 step;
The 15 step 2301: will be written back into database table correspondence the memory queue array array indexed variable F again assignment be 0, thereby make this memory array deposit the database table data that read once more for the meter reading process.The operation that above-mentioned the 14 step the 2003 and the 15 step 2301 is done for write-back table process.
Above-mentioned the 11 step 2221, when array indexed variable F is not equal to 2, carried out for the 20 step 2224: after the array sequence number is added 1, carried out for the 21 step 2225: judge that the array sequence number is whether more than or equal to the quantity N of array, if the array sequence number is more than or equal to N, carried out for the 22 step 2226: search next memory queue, and carried out for the 23 step 2227: judge that the formation sequence number is whether more than or equal to the number M of memory queue, if more than or equal to M (M=2 in the present embodiment), then finish.If the 21 step 2225 judged that the array sequence number is not greater than or equal to N, then carried out the tenth and goes on foot-carry out write-back table process 20022.When the 23 step 2227 judged that the memory queue sequence number was not greater than or equal to M, then also carry out the tenth and go on foot-carry out write-back table process 20022.Above-mentioned the 20 step 2224, the 21 step 2225, the 22 step 2226, the 23 step 2227 promptly are to search the memory queue array that can deposit the attaching position register execution result successively by the array sequence number of same memory queue and the sequence number that belongs to the memory queue of same attaching position register.
Above-mentioned second step 2120 judges that array sign F is not equal at 0 o'clock in the memory queue, carries out for the 16 step 2123: after the array sequence number is added 1; Carried out for the 17 step 2124: judge the array sequence number whether more than or equal to the quantity N of array, if more than or equal to, carry out the 18 and go on foot 2125: after the memory queue sequence number is added 1; Carried out for the 19 step: judge the formation sequence number whether more than or equal to the number M (M=2 in the present embodiment) of memory queue, if more than or equal to M, then carried out for the 15 step 2301: with F assignment again is 0, finishes.Judge that when the 17 step 2124 the array sequence number is not more than or equal to N, then carried out for second step 2120: be 0 with array sign F assignment again.Above-mentioned the 16 step 2123, the 17 step 2124, the 18 step 2125, the 19 step 2126 promptly be search memory queue successively by the array sequence number in the same memory queue, the sequence number of memory queue under the same attaching position register the array free time whether, wherein N is the array quantity of memory queue, its value is 20 in the present embodiment, M is the memory queue quantity of each attaching position register correspondence, and the M value of corresponding in the present embodiment attaching position register 1 is 2.
Fig. 6 is the detailed description of constructive process of the memory queue of the use in this interface system.The shared shared drive formation realization of data between each process in this interface system, in win32 (32 forms of Microsoft) operating system, what shared drive used between each process is that mapped file (is meant in File mapping to an internal memory, can be transformed into visit to internal memory to the visit of this file, mapping wherein is meant the corresponding relation of file and actual memory).The user can comprise Installed System Memory page or leaf (page is meant that a kind of internal memory of fixed size is fast, and the size of example page in the platform of the x86 series central processing unit of using Intel's production is the 4K byte) memory-mapped in any mapped file.The total internal memory of utilization is realized the data sharing between each process.The concrete steps that memory queue (shared drive formation) is created are:
The first step 20041: set up the interrecord structure of memory queue, promptly define the record attribute of memory queue, the type and size of clear and definite respective record attribute.Record attribute comprises processing sign, the running time of record, the character string that each field contents is merged in the database table etc.
Second step 20042: set up the memory queue structure, promptly define the memory queue attribute, the type and size of clear and definite correspondence memory formation attribute.The memory queue attribute comprises the attaching position register sequence number of memory queue correspondence, the array quantity of memory queue etc.
The 3rd step 20043: with the sequence number assignment of memory queue is 1.
The 4th step 20044: the size of calculating the memory queue of corresponding sequence number.Drawing the required size of memory queue according to memory queue structure, interrecord structure is the shared byte number of array number * interrecord structure in the shared byte number+memory queue of memory queue structure.For example: the shared byte number of memory queue structure is 20, and the array number in the memory queue is 5, and the shared byte number of interrecord structure is 10, then the required size=20+5 * 10=70 byte of this memory queue.
The 5th step 20045: establishment file (CreateFile) function creation that provides with WIN32 operating system can be shared the mapped file of read-write.The attribute of mapped file comprises filename, access limit, file status (open, close) etc., (common handle was meant a unique number to the backspace file handle after mapped file was created successfully, in order to identify many different object types, go into window, menu, internal memory, paintbrush, words brush, telephone line etc.; In Win32 operating system, handle is meant the pointer of " no type object ", the just data of one 4 byte long).
The 6th step 20046: establishment file-mapping object (CreateFileMapping) function that provides with WIN32 operating system also calls the file handle establishment file-mapping object of creating file.Creating parameter that File mapping comprises has the size of the protection option of the file handle that can share reading and writing of files, File mapping, memory queue, shared drive queue name etc.
The 7th step 20047: after file-mapping object is created successfully, the handle that returns with File mapping is as parameter, mapped file view (MapViewOfFile) function that calling WIN32 operating system provides is that file-mapping object is created view, and mapped file view (MapViewOfFile) function will return the view pointer that points to mapped file.
The 8th step 20048: the sequence number of memory queue is added 1.
The 9th step 20049: whether the sequence number of judging memory queue is greater than the memory queue quantity of needs foundation.If also not greater than, then system turn back to the 4th the step 20044, continue the establishment of next memory queue; Otherwise memory queue is created and is finished.
The view pointer that returns after utilizing memory queue to create is operated mapped file, and the read-write of internal memory has been simplified to the operation just as common variables.
Fig. 7 is described in detail first program 20011 specific procedure of reading of data from database table in the meter reading process 2001 among Fig. 3.
The first step 2110, when the meter reading program brought into operation, the sequence number assignment with attaching position register to be read (HLR) was 1 earlier;
Second step 2111, in the table 100 of judgment data storehouse to the data that need read that whether have that should attaching position register 1, if do not have, processed the finishing or present of record that needs attaching position register 1 to handle in the database of descriptions table, do not need to read again, carried out for the tenth step 2118, judge whether the sequence number of attaching position register (HLR) equals the number S of the attaching position register of this interface system and physical connection, if equate, then explanation has not had the database table data that need read, stops the meter reading data, otherwise, carried out for the 6th step 2114, only out of service to the pairing table data read of this attaching position register sequence number; The data that read if necessary carried out for the 3rd step 2112;
The 3rd step 2112, read the record in should attaching position register sequence number 1 pairing database table, if read for the first time, then should be attaching position register 1 pairing record;
In the 4th step 2331, judge whether the 3rd step reading and recording is successful, if unsuccessful, the record that does not exist should attaching position register 1 is described, carried out for the 6th step 2114, stop to read record that should the attaching position register sequence number, if read success, carried out for the 5th step;
The 5th step 20012, record in the database table that reads is write in should the memory queue of attaching position register 1, and whether judgement writes successful, if write success, interface system is carried out second step 2111, if write failure, explanation is full to pending record in should the memory queue of attaching position register sequence number or has reached the maximum pending array record number of regulation, no clear position or do not allow to write more pending record in the memory queue, interface system carried out for the 6th step 2114;
The 6th goes on foot 2114, stops to read the database table data of this attaching position register 1;
In the 7th step 2115, the attaching position register sequence number that needs are read adds 1;
The 8th step 2116, judge the attaching position register sequence number whether greater than with the number S of the attaching position register of interface system physical connection, if greater than S, the specification interface system executes one time successively by the sequence number size of the attaching position register that connects, interface system needs to restart from attaching position register 1, therefore, carry out the 9th step 2117; If not greater than S, the data of the attaching position register that can read next sequence number are described, therefore, carry out second step 2111;
The 9th step 2117 was 1 with attaching position register sequence number assignment again, restarted reading of database table data by the attaching position register sequence number, began to carry out second step again;
In the tenth step 2118, judge that whether attaching position register (HLR) sequence number equals the number S of the attaching position register of this interface system and physical connection, if equal (equating), then stops the meter reading process; Otherwise carried out for the 6th step 2114.
From the step and the process (shown in Figure 7) of above-mentioned reading database table record, the meter reading program is to read in data by the sequence number order from small to large of attaching position register.Owing to when the data write memory formation of each attaching position register is failed, all read in the data of the attaching position register of next sequence number at once, guarantee that the data of each the sequence number attaching position register in the database table at short notice can both being read in the memory queue than equality.
Because the decision table data are converted into home location register instruction in the distribution of the table data in the memory queue and the order that attaching position register is carried out is submitted in instruction.Therefore, the table data of corresponding each sequence number attaching position register are answered equiblibrium mass distribution in memory queue, guarantee that the table data of arbitrary sequence number attaching position register can both obtain handling in the short period of time.To introduce the program that the meter reading process is put into the database table data that read memory queue in detail below.
Fig. 8 is the process flow diagram of second program 220012 in the meter reading process 2001 with the database table data write memory formation that reads.Because an attaching position register can provide a plurality of logics to connect, therefore create at an attaching position register a plurality of memory queues are arranged, as shown in Figure 4, what attaching position register 1 (HLR1) was corresponding is memory queue 2011, memory queue 2012, reads the table data (also being record) that need attaching position register 1 (HLR1) to handle and can put into memory queue 1 (2011) or memory queue 2 (2012) from database table.The memory source that utilizes for balance, make the record of putting into memory queue obtain handling in the average short time, the present invention has defined two threshold values of each memory queue: the minimum array record number Vmin that is untreated, the maximum array record number Vmax that is untreated.Vmin=10 in the present embodiment, Vmax=20.The meter reading process need be determined the memory queue and the array that write earlier after reading database table data.The step of its write-in program is:
The first step 2120, the array record number Vu that is untreated in the 1st memory queue (memory queue 1 among Fig. 8) of statistics attaching position register (HLR) sequence number N (N=1 among Fig. 8);
Second step 2121, judge whether it is poll the 1st memory queue first time, the poll first time here is meant poll the 1st memory queue first time in the process that travels through once the memory queue of all sequence number attaching position registers (attaching position register 1~attaching position register s), if for the first time, then carried out for the 3rd step 2122, if not for the first time, then carry out the 4th step 2123;
The 3rd step 2122, whether the array record number Vu that is untreated that judges the 1st memory queue is greater than the minimum array record number Vmin that is untreated, if, illustrate that the array that is untreated in current the 1st memory queue writes down number between Vmin and Vmax, the meter reading process does not write the table data in the 1st memory queue, interface system directly carried out for the 8th step 2125, otherwise interface system carried out for the 4th step 2123;
The 4th step 2123, judge whether the array record number Vu that is untreated in the 1st memory queue equals the maximum array record number Vmax that is untreated, if equal, illustrate that then this first memory queue array record number that is untreated has reached maximal value, do not allow to write the table data again, interface system jumped to for the 8th step 2125, search the record number situation that is untreated of the 2nd memory queue, otherwise, illustrate that the 1st memory queue also has idle array can allow to write the table data, carried out for the 5th step 2124;
In the 5th step 2124, the database table data that read are write in the 1st memory queue;
In the 6th step 2112, after data successfully write the 1st memory queue, interface system carried out for the 6th step 2112, read next bar table data of this attaching position register (HLR) sequence number N;
The 7th step 2113, judge whether the table data that read this attaching position register sequence number N are successful, if it is unsuccessful, carried out for the 13 step 2114, stop to read the table data of this attaching position register sequence number N, if the first step 2120 is then carried out in success, carry out the judgement and the operation of the write memory formation array of next round;
The 8th step 2125, begin the 2nd memory queue of this attaching position register sequence number N is carried out the program that (memory queue 2 among Fig. 8) write the table data, the 2nd memory queue is repeated the first step, add up the array record number Vu that is untreated in the 2nd memory queue of this attaching position register sequence number N; Above-mentioned when write list procedure from the 3rd the step 2122 enter the 8th the step 2125, or write list procedure from the 4th the step 2123 jump to the 8th the step 2125 o'clock, promptly the 2nd memory queue is repeated the list procedure of writing that the 1st memory queue is carried out is begun;
The 9th step 2126 repeated for second step to the 2nd memory queue, judged whether the 2nd memory queue is the memory queue of the poll first time, if, carried out for the tenth step 2127, if not, then carried out for the 11 step;
The tenth step 2127, the 2nd memory queue was repeated for the 3rd step, judge that the array record number Vu that is untreated is whether greater than the minimum array record number Vmin that is untreated, if greater than, the array record number that is untreated that pairing the 1st memory queue of this attaching position register sequence number N and the 2nd memory queue then are described all is untreated between the record number Vmax in be untreated record number Vmin and maximum of minimum, carried out for the 13 step 2114, stop to write the pairing table data of this attaching position register sequence number N;
The 11 step 2128 repeated for the 4th step to the 2nd memory queue, judged whether the record number Vu that is untreated equals the maximum array record number Vmax that is untreated, if be not equal to, illustrate in the 2nd memory queue to write the database table data, carried out for the 12 step 2129, otherwise carried out for the 13 step 2114;
The 12 step 2129 repeated for the 5th step to the 2nd memory queue, will show data and write in the 2nd memory queue;
In the 13 step 2114, stop to read N number pairing table data of this attaching position register;
The 14 step 2115, the attaching position register sequence number N that needs reading of data added 1 after, repeat above-mentioned write-in program again.
According to above-mentioned steps, the meter reading procedure order is judged the deposit data situation of memory queue, when to the either memory formation, array record number Vu>minimum is untreated and writes down number Vmin if be untreated, then this memory queue is not done any operation, the meter reading process begins to judge the deposit data situation of next memory queue; The array record number Vmin if the array record number Vu<minimum that is untreated of memory queue is untreated, the table data that then meter reading program continuous several times writes corresponding this memory queue are up to the array record number Vu=maximum that is untreated of this memory queue record number Vmax that is untreated, or the meter reading program is failed from the database table reading of data.So just making the array record number Vu that is untreated of each memory queue remain on be untreated record number Vmin and maximum of minimum is untreated between the record number Vmax.Guaranteed the equiblibrium mass distribution of either memory queuing data, the data that make each memory queue at short notice can both than equality obtain handle.
Because communication process reads internal storage data and the attaching position register execution result is put into process that memory queue, write-back table process be written back into database table with the result of the attaching position register execution command of memory queue all is to judge successively by order from small to large according to the sequence number of the sequence number of attaching position register and memory queue to read and write, and does not therefore repeat them here.
Though the embodiment that top basis is concrete, a kind of method that improves processing speed of interface system of attaching position register of the present invention is specifically described, and is not in order to limit scope of the present invention but present embodiment only is regarded as explanation of the present invention.In fact, method of the present invention is applicable to that also other need from database table reading of data and and the interface system that communicates of another system.Should know, under the situation of marrow that does not depart from described technical scheme and scope, can make various changes, replacement and transformation, as changing the number of the corresponding memory queue of attaching position register, the length of either memory formation, corresponding relation of memory queue and the degree of communicating by letter or the like.

Claims (5)

1. method that improves processing speed of interface system of attaching position register, be connected in the interface system that is based upon between database table and the attaching position register in the server and carry out meter reading program, signal procedure and write-back list procedure, it is characterized in that between meter reading program that interface system is carried out and signal procedure, being added in the internal memory of server and set up memory queue, and with in the formation of reading database table data write memory, the program of attaching position register is submitted in the instruction that becomes attaching position register to carry out the table data-switching in its memory queue again; Between signal procedure that interface system is carried out and write-back list procedure, add the instruction execution result that will receive attaching position register and write in the memory queue in the internal memory that is based upon server, and the result that the attaching position register in the memory queue executes instruction is written back to program in the database table.
2. the method for raising processing speed of interface system of attaching position register according to claim 1 is characterized in that the concrete steps that interface system is handled are:
(1) carry out the meter reading process:
At first according to the logic linking number of the attaching position register that links to each other with interface system, set up the memory queue that exists with the array form of similar number in the internal memory of server, definition simultaneously comprises the sequence number of the attaching position register of memory queue correspondence, the association attributes of the array quantity in the memory queue; Carry out first program then, according to the sequence number order reading database table data from small to large of attaching position register; Carry out second program again; The record that will read according to the sequence number of attaching position register in the record writes in the pairing memory queue of this sequence number attaching position register, if the pairing memory queue number of this sequence number attaching position register greater than 1, is then deposited the table data of corresponding attaching position register sequence number according to the sequence number order from small to large of memory queue;
(2) communicate process:
At first read the above-mentioned table data that deposit in the memory queue, convert thereof into the receptible instruction of attaching position register, and attaching position register is submitted in the instruction of the attaching position register after will changing; Receive the instruction execution result of attaching position register simultaneously, and the instruction execution result of the attaching position register that receives is written in the memory queue;
(3) carry out write-back table process:
Read the above-mentioned instruction execution result that deposits the attaching position register in the memory queue in, and it is written back in the database table.
3. the method for raising processing speed of interface system of attaching position register according to claim 2 is characterized in that the concrete steps of creating memory queue in the internal memory of server are:
The first step: set up the interrecord structure of memory queue, promptly define the record attribute of memory queue, the type and size of clear and definite respective record attribute;
Second step: set up the memory queue structure, promptly define the memory queue attribute, the type and size of clear and definite correspondence memory formation attribute;
The 3rd step: with the sequence number assignment of memory queue is 1;
The 4th step: calculate the size of the memory queue of corresponding sequence number, drawing the required size of memory queue according to memory queue structure, interrecord structure is the shared byte number of array number * interrecord structure in the shared byte number+memory queue of memory queue structure;
The 5th step: establishment file (CreateFile) function creation of utilizing WIN32 operating system to provide can be shared the mapped file of read-write;
The 6th step: establishment file-mapping object (CreateFileMapping) function that utilizes WIN32 operating system to provide, and call the file handle of creating file and create file-mapping object;
The 7th step: after file-mapping object was created successfully, the handle that returns with File mapping was as parameter, and mapped file view (MapViewOfFile) function that calling WIN32 operating system provides is a file-mapping object establishment view;
The 8th step: the sequence number of memory queue is added 1;
The 9th step: judge the memory queue the quantity whether sequence number of memory queue is set up greater than needs, as if also not greater than, then interface system turned back to for the 4th step, continued the establishment of next memory queue; Otherwise memory queue is created and is finished.
4. the method for raising processing speed of interface system of attaching position register according to claim 2 is characterized in that first program detailed process of reading of data from database table is in the meter reading process:
The first step: with the sequence number assignment of attaching position register to be read is 1;
Second step: to should whether the data that need read being arranged attaching position register 1,, do not need to read again in the table of judgment data storehouse, carried out for the tenth step if do not have; If have, then carried out for the 3rd step;
The 3rd step: read to the record in should attaching position register sequence number 1 pairing database table;
The 4th step: judge whether the 3rd step reading and recording is successful, if unsuccessful, carries out for the 6th step; If success carried out for the 5th step;
The 5th step: the record in the database that reads is write in should the memory queue of attaching position register 1, and judge and write whether success; If write success, carried out for second step; If write failure, carried out for the 6th step;
The 6th step: the database table data that stop to read this attaching position register sequence number 1;
The 7th step: the attaching position register sequence number that needs are read adds 1;
The 8th step: after the 7th step, attaching position register sequence number that needs are read added 1, judge the attaching position register sequence number whether greater than with the number of the attaching position register of interface system and physical connection, as if greater than, carried out for the 9th step; If not greater than, carried out for second step;
The 9th step: with attaching position register sequence number assignment again is 1, carries out for second step again;
The tenth step: judge that whether the sequence number of attaching position register equals the number of the attaching position register of this interface system and physical connection, if equate, stops the meter reading program; Otherwise reading of these pairing table data of attaching position register sequence number only out of service.
5. the method for raising processing speed of interface system of attaching position register according to claim 2, it is characterized in that in the meter reading process, with the concrete steps in the database table data write memory formation array that reads be: the sequence number N that at first determines attaching position register, determine the pairing memory queue number of attaching position register M at this sequence number N, determine two threshold values of each memory queue again, minimum array record number (Vmin) and the maximum array that is untreated that is untreated writes down number (Vmax), begins to write the table data then;
The first step: array record number (Vu) is untreated in the 1st memory queue of statistics attaching position register sequence number N;
Second step: judge whether it is poll the 1st memory queue first time, if for the first time, carried out for the 3rd step; If not for the first time, carried out for the 4th step;
The 3rd step: judge the array record number (Vu) that is untreated in the 1st memory queue whether greater than the minimum array record number (Vmin) that is untreated, if greater than, carried out for the 8th step; Otherwise carried out for the 4th step;
The 4th step: judge that whether the array record number (Vu) that is untreated in the 1st memory queue equals the maximum array record number (Vmax) that is untreated, if equal, carries out for the 8th step; Otherwise carried out for the 5th step;
The 5th step: the database table number that reads is write in the array of the 1st memory queue;
The 6th step: next the bar table data that reads this attaching position register sequence number N;
The 7th step: judge whether the table data that read this attaching position register sequence number N are successful, if unsuccessful, carry out for the 13 step; If the first step is carried out in success;
The 8th step: the 2nd memory queue to attaching position register sequence number N repeats the first step, the array record number (Vu) that is untreated of the 2nd memory queue of statistics attaching position register sequence number N;
The 9th step: the 2nd memory queue was repeated for second step, promptly judge whether it is poll the 2nd memory queue first time, if carried out for the tenth step; If not, carried out for the 11 step;
The tenth step: the 2nd memory queue was repeated for the 3rd step, judge the array record number (Vu) that is untreated in the 2nd memory queue whether greater than the minimum array record number (Vmin) that is untreated, if greater than, carried out for the 13 step; Otherwise carried out for the 11 step;
The 11 step: the 2nd memory queue was repeated for the 4th step, judge that whether the array record number (Vu) that is untreated in the 2nd memory queue equals the maximum array record number (Vmin) that is untreated, if equal, carries out for the 13 step; Otherwise, then carried out for the 12 step;
The 12 step: the 2nd memory queue was repeated for the 5th step, will show data and write in the 2nd memory queue;
The 13 step: stop to read the table data of this attaching position register sequence number N, carried out for the 14 step;
The 14 step: after will needing the attaching position register sequence number N of reading of data to add 1, repeat the above-mentioned list procedure of writing again.
CNB2005100246430A 2005-03-25 2005-03-25 Method for raising processing speed of interface system of attaching position register Expired - Fee Related CN100343812C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100246430A CN100343812C (en) 2005-03-25 2005-03-25 Method for raising processing speed of interface system of attaching position register

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100246430A CN100343812C (en) 2005-03-25 2005-03-25 Method for raising processing speed of interface system of attaching position register

Publications (2)

Publication Number Publication Date
CN1658162A true CN1658162A (en) 2005-08-24
CN100343812C CN100343812C (en) 2007-10-17

Family

ID=35007667

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100246430A Expired - Fee Related CN100343812C (en) 2005-03-25 2005-03-25 Method for raising processing speed of interface system of attaching position register

Country Status (1)

Country Link
CN (1) CN100343812C (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102117308B (en) * 2010-01-06 2012-11-14 卓望数码技术(深圳)有限公司 Data processing method and data processing system
CN103065238A (en) * 2012-12-20 2013-04-24 北京讯鸟软件有限公司 Pre-preparation method for list information trend through internal memory
CN108509257A (en) * 2017-02-28 2018-09-07 苏宁云商集团股份有限公司 A kind of message treatment method and device based on multithreading

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB9414951D0 (en) * 1994-07-25 1994-09-14 British Telecomm Computer system having client-server architecture
KR100594132B1 (en) * 2000-01-28 2006-06-28 삼성전자주식회사 Interface device and method of code location multiple access mobile telephone network system home location register with improved signal processing performance
CN1254118C (en) * 2001-03-22 2006-04-26 中兴通讯股份有限公司 Message access method for mobile paging station
CN1165141C (en) * 2001-03-27 2004-09-01 华为技术有限公司 Method for interface drive repeating procedure of router

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102117308B (en) * 2010-01-06 2012-11-14 卓望数码技术(深圳)有限公司 Data processing method and data processing system
CN103065238A (en) * 2012-12-20 2013-04-24 北京讯鸟软件有限公司 Pre-preparation method for list information trend through internal memory
CN103065238B (en) * 2012-12-20 2016-08-31 北京讯鸟软件有限公司 A kind of method by internal memory pre-preparation dynamic to list information
CN108509257A (en) * 2017-02-28 2018-09-07 苏宁云商集团股份有限公司 A kind of message treatment method and device based on multithreading

Also Published As

Publication number Publication date
CN100343812C (en) 2007-10-17

Similar Documents

Publication Publication Date Title
CN1134730C (en) System and method for reducing footprint of preloaded classes
CN1112642C (en) Design part reusing method in configuration tool
CN1133308C (en) Radio communication system and method for changing displaying speech of radio user's device
CN1928825A (en) Server implementing method and server system
CN1849587A (en) Multiple operating systems sharing a processor and a network interface
EP2073161A1 (en) Matching method and system for marketing campaign recommendation
CN1131859A (en) Subscriber information service system
CN1199899A (en) Nonvolatile semiconductor disk device
CN1719786A (en) Automatic testing system and method for command of command line interface of data communication apparatus
CN101075239A (en) Composite searching method and system
CN100343812C (en) Method for raising processing speed of interface system of attaching position register
CN1527509A (en) Test method
CN1617496A (en) Method for automaticall updating configuration for next generation network terminal
CN1886976A (en) Method, software and apparatus for performing actions on a wireless device using action lists and versioning
CN1702659A (en) IP base LSI designing system and designing method
CN1885262A (en) Online updating method for network household electrical appliance
CN117455222A (en) Solving method based on distributed heterogeneous flow shop group scheduling problem
CN1339129A (en) Data transmission method, computer-readable medium, and data transmission apparatus
CN1149795C (en) Advanced service architecture for next generation network services and intelligent data network router
CN1255737C (en) Network relay device and network relay method
CN1328299A (en) Method and system for collecting and inquiring information
CN1845548A (en) Service system and method for realizing mobile phone terminal PC network game
CN1588408A (en) Method and system for quick establishing business processing flow using discrete unit
CN1770798A (en) Method for traffic data gathering and analysis statistic
CN1866867A (en) Plan and task realizing method in device management

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20071017

Termination date: 20170325